package com.demo.mq.activemq.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;

import javax.jms.Topic;

/**
 * MQ配置
 *
 * @author lee9213@163.com
 * @version 1.0
 * @date 2017/3/13 18:10
 */
@Configuration
@EnableJms
public class ActiveMQConfig {

//    @Bean
//    public Queue queue(){
//        return new ActiveMQQueue("sample.queue");
//    }

    @Bean
    public Topic topic(){

        return new ActiveMQTopic("sample.topic");
    }
}
